package cn.dwy2002.binaryhandwritingserver.controller;


import cn.dwy2002.binaryhandwritingserver.common.Result;
import cn.dwy2002.binaryhandwritingserver.pojo.dto.LoginDTO;
import cn.dwy2002.binaryhandwritingserver.service.service.AdminService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户管理
 *
 * @author 杜伟毅
 * @version 1.0
 * @since 2025/05/29
 */
@RestController
@RequiredArgsConstructor
public class AdminController {
    private final AdminService service;

    @PostMapping("/login")
    public Result<String> login(@RequestBody LoginDTO loginInfo) {
        return service.login(loginInfo);
    }
}
